<%@ page language="java" import="java.util.*" pageEncoding="utf8"%>
<%@ page import="com.taobao.snowsnow.hibernate.pojo.*" %>
<%@ taglib uri="/struts-tags" prefix="s" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>添加蝴蝶结参数</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta charset="utf8" />
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		<!--
			.aa {
				font-family: Arial, Helvetica, sans-serif;
				font-size: 14px;
				border: 2px solid #6cf;
				border-collapse:collapse;
				width: 650px;
			}
			 .aa td {
			 	border: 1px solid #6cf;
				text-align: center;
				padding-top: 4px;
				padding-bottom: 4px;
				padding-left: 10px;
				padding-right: 10px;
			 }
		-->
	</style>
	<script src="../js/jquery-latest.js"></script>
	<script type="text/javascript">
		function addBowParam() {
			var tr = "<tr><td><input name='names' id='name' maxlength='25' /></td><td><input name='length' id='length' maxlength='10' /></td><td><input name='index' id='index' maxlength='5' /></td></tr>";
			//$("#bowParamContext").append(tr);
			$("#last").before(tr);
		}
	</script>

  </head>
  <body>
  	<h1 align='center'>店铺信誉</h1>
  	<a href='index.jsp'>返回主页</a>
  	<form action="./addBowParam.action">
  		<input type="hidden" name="productCollectId" value="${productCollectId}" />
  		
  		<table id="bowParamContext" class='aa' align='center'>
  		<tr>
  			<td>
  				部件名称  				
  			</td>
  			<td>长度</td>
  			<td>权重</td>
  		</tr>
  		
  		<s:iterator var="paramss" value="#session.bowParams" >
  			<tr>
	  			<td>
	  				<input type="hidden" name="ids" id="name" value="${paramss.id}" maxlength="5" />
	  				<input type="text" name="names" id="name" value="${paramss.name}" maxlength="25" />
	  			</td>
	  			<td><input type="text" name="length" id="length" value="${paramss.length}" maxlength="10" /></td>
	  			<td><input type="text" name="index" id="index" value="${paramss.weight}" maxlength="5" /></td>
  			</tr>
  		</s:iterator>
  		
  		<tr id="last">
  			<td colspan="3">
  				<input type="submit" value="提交" />
  				<input type="reset" value="重置" />
  				<input type="button" onclick="javascript:addBowParam();return false;" value="添加部件" />
  			</td>
  		</tr>
  		
    </table>
  	</form>
  </body>
</html>
